package com.wn.test;

import com.wn.bean.User;
import com.wn.mvc.controller.UserController;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author yellow Docter
 * @date 2022 -07-06
 * @desc
 */
public class SpringTest3 {

    @Test
    public void demo01() {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContextMvc.xml");

        UserController userController = applicationContext.getBean(UserController.class);

        User user = new User();
//        user.setUsername("aa");
//        user.setPassword("123");

        userController.save(user);

    }

}
